# coding=utf-8
from douban.mongo import db


class douban_datas:
    def __init__(self):
        client = db().getClient()
        self.douban = client.douban
        self.movie = self.douban.movie

    def get_movie_data(self):
        data = self.movie.find({})
        return list(data)

    def get_movie_data_for_where(self,country):
        data = self.movie.find({"country": {"$regex":r'.*'+country+'.*'}});
        return list(data)
